package com.ushine.web.component.exception;


/**
 * @Author: yls
 * @Description: 返回码定义
 * 规定:
 * #2001～2999 区间表示用户错误
 * @Date Create in 2019/7/22 19:28
 */
public enum LoginErrorEnum implements BaseErrorInfoInterface {
    /**
     * 用户错误
     */
    USER_NOT_LOGIN(2001, "用户未登录！"),
    USER_ACCOUNT_EXPIRED(2002, "登录已过期，请重新登录！"),
    USER_CREDENTIALS_ERROR(2003, "用户或者密码错误，请重新输入！"),
    USER_CREDENTIALS_EXPIRED(2004, "密码过期，请联系管理员!"),
    USER_ACCOUNT_DISABLE(2005, "账户被禁用，请联系管理员!"),
    USER_ACCOUNT_LOCKED(2006, "账号被锁定，请联系管理员!"),
    USER_ACCOUNT_NOT_EXIST(2007, "账号不存在！"),
    USER_ACCOUNT_ALREADY_EXIST(2008, "账号已存在！"),
    USER_ACCOUNT_USE_BY_OTHERS(2009, "账号下线！"),
    USER_ACCOUNT_USE_BY_OTHER_LOGIN(2010, "账号在其他地方登录！"),
    USER_LOGIN_FAILED(2011, "登录失败，请检查用户名或者密码是否正确！");

    private Integer errorCode;
    private String errorMsg;

    LoginErrorEnum(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    @Override
    public Integer getErrorCode() {
        return errorCode;
    }

    @Override
    public String getErrorMsg() {
        return errorMsg;
    }

}
